<html>
<head><meta charset="utf-8"><title>Improving blanket_impls perf · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html">Improving blanket_impls perf</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218767079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218767079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218767079">(Dec 03 2020 at 23:01)</a>:</h4>
<p><span class="user-mention" data-user-id="366160">@Caleb Webber</span> are you still planning to work on <a href="https://github.com/rust-lang/rust/issues/78761">https://github.com/rust-lang/rust/issues/78761</a> ? nbd if not but <span class="user-mention" data-user-id="307289">@Poliorcetics</span> was interested in taking a look</p>



<a name="218767144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218767144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218767144">(Dec 03 2020 at 23:02)</a>:</h4>
<p><span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span></p>



<a name="218767311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218767311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218767311">(Dec 03 2020 at 23:03)</a>:</h4>
<p><span class="user-mention" data-user-id="307289">@Poliorcetics</span> also fyi it turns out that blanket impls are <em>completely</em> broken currently due to some bad caching in rustdoc <a href="https://github.com/rust-lang/rust/issues/78800">https://github.com/rust-lang/rust/issues/78800</a></p>



<a name="218767339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218767339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218767339">(Dec 03 2020 at 23:03)</a>:</h4>
<p>it doesn't return anything if you call <code>get_blanket_impls</code> more than once <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="218767437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218767437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218767437">(Dec 03 2020 at 23:04)</a>:</h4>
<p><span class="user-mention" data-user-id="366160">@Caleb Webber</span> IIRC the issue with get_blanket_impls was not related to my suggested perf fix, which was 'call blanket_impls less'</p>



<a name="218767451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218767451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218767451">(Dec 03 2020 at 23:04)</a>:</h4>
<p>so I think it makes sense for you and <span class="user-mention" data-user-id="307289">@Poliorcetics</span> to work on both in parallel</p>



<a name="218775002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775002">(Dec 04 2020 at 00:41)</a>:</h4>
<p>(deleted)</p>



<a name="218775111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775111">(Dec 04 2020 at 00:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf/near/218767079">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="366160">Caleb Webber</span> are you still planning to work on <a href="https://github.com/rust-lang/rust/issues/78761">https://github.com/rust-lang/rust/issues/78761</a> ? nbd if not but <span class="user-mention silent" data-user-id="307289">Poliorcetics</span> was interested in taking a look</p>
</blockquote>
<p>I'm good with this, I'm still working on 78800, haven't really figured out perf issues yet</p>



<a name="218775290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775290">(Dec 04 2020 at 00:45)</a>:</h4>
<p>the other thing to consider is whether rustdoc should be using <code>get_blanket_impls</code> at <em>all</em></p>



<a name="218775310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775310">(Dec 04 2020 at 00:45)</a>:</h4>
<p>from what <span class="user-mention" data-user-id="366160">@Caleb Webber</span> was saying it sounds like it's pretty heavily specialized for calculating all impls exactly once</p>



<a name="218775316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775316">(Dec 04 2020 at 00:45)</a>:</h4>
<p>which is not what collect_intra_doc_links needs</p>



<a name="218775608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775608">(Dec 04 2020 at 00:50)</a>:</h4>
<p>I'd be curious to see what performance impact we'd have by removing that behavior</p>



<a name="218775914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218775914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218775914">(Dec 04 2020 at 00:55)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> I pinged you on <a href="https://github.com/rust-lang/rust/issues/78800">https://github.com/rust-lang/rust/issues/78800</a> but you might have missed it - what do you think about just not looking at blanket impls for resolving associated items? It's been broken since implemented so no one can be using it, and it's like a 100x slowdown</p>



<a name="218776008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776008">(Dec 04 2020 at 00:56)</a>:</h4>
<p>ha, I'd be okay with that too, less coding <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="218776034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776034">(Dec 04 2020 at 00:57)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> oh I thought I'd responded. Yeah just kill it for now</p>



<a name="218776038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776038">(Dec 04 2020 at 00:57)</a>:</h4>
<p>I would like to have it if possible</p>



<a name="218776044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776044">(Dec 04 2020 at 00:57)</a>:</h4>
<p>yeah I think we could reland it at some point in the future</p>



<a name="218776052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776052">(Dec 04 2020 at 00:57)</a>:</h4>
<p>but as is it's doing nothing and hurting perf :/</p>



<a name="218776358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776358">(Dec 04 2020 at 01:02)</a>:</h4>
<p>hmm, are you okay with losing auto traits as well? Not sure how with the current implementation you'd remove blanket impls without losing auto impls</p>



<a name="218776365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218776365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218776365">(Dec 04 2020 at 01:02)</a>:</h4>
<p>auto traits are just Send and Sync, right? those don't have associated items</p>



<a name="218777055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777055">(Dec 04 2020 at 01:14)</a>:</h4>
<p>would this close 78761?</p>



<a name="218777168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777168">(Dec 04 2020 at 01:16)</a>:</h4>
<p>I guess so, yeah. Not the issue that they don't work, though.</p>



<a name="218777184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777184">(Dec 04 2020 at 01:16)</a>:</h4>
<p>yeah<br>
I would think we'd want to plan to reimplement something later...</p>



<a name="218777197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777197">(Dec 04 2020 at 01:17)</a>:</h4>
<p>definitely, this is just temporary because it's doing nothing right now</p>



<a name="218777240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777240">(Dec 04 2020 at 01:18)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/79682">https://github.com/rust-lang/rust/pull/79682</a></p>



<a name="218777451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Webber <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777451">(Dec 04 2020 at 01:21)</a>:</h4>
<p>ha, I was just creating the PR when I saw you beat me to it by three minutes :P</p>



<a name="218777516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Improving%20blanket_impls%20perf/near/218777516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Improving.20blanket_impls.20perf.html#218777516">(Dec 04 2020 at 01:22)</a>:</h4>
<p>oops, sorry <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>